<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>常见事件</title>
</head>
<body>

<input type="text" id="username">

</body>
</html>
<script>
    //1.失去焦点事件
    document.getElementById("username").onblur=function () {
        alert("失去焦点")
    }
    //2.加载完执行事件
    window.onload=function () {
        alert("加载完了")
    }
    //3.鼠标移动到元素之上
    document.getElementById("username").onmouseover=function () {
        alert("鼠标来喽")
    }

</script>